<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<script type="text/javascript">
	
</script>

<form id="pagerForm" method="post" action="${path }/admin/userRechargeStrategy">
	<input type="hidden" name="eqType" value="${eqType }"/>
	<input type="hidden" name="eqSubId" value="${eqSubId }" />
	<input type="hidden" name="eqExpandCode" value="${eqExpandCode }" />
	<input type="hidden" name="eqApplicablePlatformId" value="${eqApplicablePlatformId }" />
	<input type="hidden" name="pageNum" value="${pageTurn.page }" />
	<input type="hidden" name="numPerPage" value="${pageTurn.pageSize }" />
	<input type="hidden" name="rel" value="${rel }" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${path }/admin/userRechargeStrategy" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
                    <label>类型：</label>
                    <select id="eqType" name="eqType" >
                    	<option value="1" ${eqType == 1 ? 'selected=selected' : ''}>充值</option>
                    	<option value="2" ${eqType == 2 ? 'selected=selected' : ''}>送积分</option>
                    </select>
                </td>
				<td>
                    <label>策略：</label>
                    <select id="eqSubId" name="eqSubId" >
                    	<c:if test="${eqType == 1 }">
                        	<option value="1" ${eqSubId == 1 ? 'selected=selected' : ''}>按金额数值赠送</option>
                    		<option value="2" ${eqSubId == 2 ? 'selected=selected' : ''}>按金额比例赠送</option>
                    	</c:if>
                    	<c:if test="${eqType == 2 }">
                        	<option value="1" ${eqSubId == 1 ? 'selected=selected' : ''}>按消费金额数值赠送</option>
                    		<option value="2" ${eqSubId == 2 ? 'selected=selected' : ''}>按消费金额比例赠送</option>
                    	</c:if>
					</select>
                </td>
                <td>
                    <label>平台：</label>
					<select  name="eqApplicablePlatformId" id="eqApplicablePlatformId" class="combox">
						<option value="">请选择</option>
						<c:forEach items="${applicablePlatformMap}" var="entry">
							<option value="${entry.key}">${entry.value}</option>
						</c:forEach>
					</select>
					<script type="text/javascript">
						jQuery('#eqApplicablePlatformId').val("${eqApplicablePlatformId }");
					</script>
                </td>
				<td>
                    <label>渠道：</label>
					<select  name="eqExpandCode" id="eqExpandCode" class="combox">
						<option value="">请选择</option>
						<c:forEach items="${expandCodeEnumTypeMap}" var="entry">
							<option value="${entry.key}">${entry.value}</option>
						</c:forEach>
					</select>
					<script type="text/javascript">
						jQuery('#eqExpandCode').val("${eqExpandCode }");
					</script>
                </td>

				<td>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
				</td>
			</tr>
		</table>
		<script type="text/javascript">
			$('#eqType').change(function(){ 
				$("#eqSubId").empty();
				if($(this).val()==2){
					$("#eqSubId").append("<option value='1' selected>按消费金额数值赠送</option>");
					$("#eqSubId").append("<option value='2'>按消费金额比例赠送</option>");
				}else{
					$("#eqSubId").append("<option value='1' selected>按金额数值赠送</option>");
					$("#eqSubId").append("<option value='2'>按金额比例赠送</option>");
				}

			});
		</script>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${path }/admin/userRechargeStrategy/edit.do?rel=${rel}" rel="${rel}" target="dialog" width="610" height="550"><span>添加</span></a></li>
			<li><a class="delete" href="${path }/admin/userRechargeStrategy/delete.do?rel=${rel}" target="selectedTodo" rel="ids" title="确定删除?"><span>删除</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="115">
  		<thead>
			<tr>
				<th>ID<label style="float:left"><input type="checkbox" class="checkboxCtrl" group="ids" /></label></th>
				<th>充值/消费金额</th>
				<th>赠送金额</th>
				<th>赠送积分</th>
				<th>描述</th>
				<th>开始时间</th>
				<th>结束时间</th>
				<th>创建时间</th>
				<th>创建者</th>
				<th>平台</th>
				<th>渠道</th>
				<th width="120">操作</th>
			</tr>
		</thead>
		  <tbody> 
		  			<c:choose>
						<c:when test="${null==userRechargeStrategyList||userRechargeStrategyList.isEmpty()}">
							<tr class="tatr2">
								<td colspan="8" align="center">暂无数据</td>
							</tr>
						</c:when>
						<c:otherwise>
							<c:forEach items="${userRechargeStrategyList}" var="userRechargeStrategyList">
								<tr target="id" rel="${userRechargeStrategyList.id}">
								<td>
									<input type="checkbox" name="ids" id="ids" value="${userRechargeStrategyList.id}"/>${userRechargeStrategyList.id}
								</td>
								<td><a title="${userRechargeStrategyList.rcMoney}"  href="#">${userRechargeStrategyList.rcMoney}</a></td>
								<td>${userRechargeStrategyList.giveMoney}</td>
								<td>${userRechargeStrategyList.givePoint}</td>
								<td>${userRechargeStrategyList.remark}</td>
								<td>
									<fmt:formatDate value="${userRechargeStrategyList.startTime}" pattern="yyyy-MM-dd HH:mm:ss" />
								</td>
								<td>
									<fmt:formatDate value="${userRechargeStrategyList.endTime}" pattern="yyyy-MM-dd HH:mm:ss" />
								</td>
								<td>
									<fmt:formatDate value="${userRechargeStrategyList.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
								</td>
								<td>${userRechargeStrategyList.creater}</td>
								<td>${applicablePlatformMap[userRechargeStrategyList.applicablePlatformId]}</td>
								<td>${expandCodeEnumTypeMap[userRechargeStrategyList.expandCode]}</td>
								<td><a title="修改" target="dialog" href="${path}/admin/userRechargeStrategy/edit?id=${userRechargeStrategyList.id}&rel=${rel}" rel="${rel}"  width="610" height="550"><span>修改</span></a>&nbsp;
								</td></tr>
							</c:forEach>
						</c:otherwise>
					</c:choose>
		</tbody>
	</table>

    <div style="clear:both"></div>
    <div class="panelBar">
        <%@ include file="/inc/admin_pagination.jsp" %>
    </div>
</div>

